home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12315 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.5 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Borland C's tmpnam()
  5. Date: Sun, 31 Mar 96 12:55:46 GMT
  6. Organization: none
  7. Message-ID: <828276946snz@genesis.demon.co.uk>
  8. References: <AD75E5DC9668E2A52@mcdiala13.it.luc.edu> <Pine.A32.3.91.960322134158.23347A-100000@red.weeg.uiowa.edu> <AD78E5E796681EC58@mcdialb10.it.luc.edu> <827626790snz@genesis.demon.co.uk> <AD7CDFD39668AABD2@mcdiala01.it.luc.edu>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <AD7CDFD39668AABD2@mcdiala01.it.luc.edu>
  15.            VArase@varase.it.luc.edu "Verne Arase" writes:
  16.  
  17. >In article <827626790snz@genesis.demon.co.uk>,
  18. >Lawrence Kirby <fred@genesis.demon.co.uk> wrote:
  19. >
  20. > >>It seems to be a good start for a serious tempname(), however :-).
  21. > >
  22. > >The C language standard has no concept of a directory so, unless I
  23. > >misunderstand you, I can't see what this would do differently from
  24. > >tmpnam().
  25. >
  26. >Perhaps Borland C is supported on more than one platform?
  27.  
  28. Why would that make any difference?
  29.  
  30. >I thought that only DOS/Intel offspring platforms were supported; that's
  31. >why I limited my query to that specific compiler; else I would've included
  32. >the target environment.
  33.  
  34. Don't forget that you are posting to comp.lang.c where the bias is for
  35. discussing the standard, platform-independent, C language. The place to
  36. discuss the specific traits and extensions of Borland C is somewhere
  37. like comp.os.msdos.programmer.
  38.  
  39. >The Borland C compiler tmpnam() function returns an 8.3 filename, which is
  40. >insufficient for determining if a filename is unique in any but the default
  41. >directory (if indeed it does that). I was reluctant to change the default
  42. >directory for reasons I won't enumerate here.
  43. >
  44. >If you're stating that tmpnam() under Borland C does indeed check to see
  45. >that the file name is unique, I'll quash that reluctance and change the
  46. >default directory.
  47.  
  48. I don't know what Borland C actually does. It it is a conforming
  49. implementation it must ensure that the name it generates is valid and doesn't
  50. already exist in the filesystem.
  51.  
  52. >Are you saying you know this as a known fact, or are you simply reciting
  53. >some ANSI C recommendation?
  54.  
  55. It is not a recommendation, it is a requirement on any conforming
  56. implementation.
  57.  
  58. -- 
  59. -----------------------------------------
  60. Lawrence Kirby | fred@genesis.demon.co.uk
  61. Wilts, England | 70734.126@compuserve.com
  62. -----------------------------------------
  63.